352"\"select etab,(TO_CHAR (date_fin,'FXYYYYMMDD')),TO_CHAR(nb_bp,'FM99999'),tpdsob,decode(tpdsob,'E+',1,'EB',2,'C+',3,'CB','4','G+',5,'GB',6,7),numcli from GYTTabBonPlan \\\n" \
353"where etab = :etab \\\n" \
354"union select b.etab,(TO_CHAR (b.date_fin,'FXYYYYMMDD')),TO_CHAR(b.nb_bp,'FM99999'),b.tpdsob,decode(b.tpdsob,'E+',1,'EB',2,'C+',3,'CB','4','G+',5,'GB',6,7),numcli from GYTTabEpjMic a, GYTTabBonPlan b \\\n" \
355"where a.etab = :etab and b.numcli = substr(a.numobj,5,8) and b.numprod = substr(a.numobj,13,4) and b.tpdsob = a.tpdsob \\\n" \
356"order by 002 desc,003 desc,005,006\"\n" \
357"\n" \
358"#define GIV_RQ_SELECT_IMAG \\\n" \
359"\"select to_char(nbimag),to_char(imagcat),imagmenu from GYTTabPvImag \\\n" \
360"where numobj = :numobj\"\n" \
361"\n" \
362"#define GIV_RQ_SELECT_STAT \\\n" \
363"\"select estatan from GYTTabEStatAn \\\n" \
364"where numcli = :numcli\"\n" \
365"\n" \
366"/* Requete de lecture de EvIlo */\n" \
367"#define GIV_RQ_SELECT_EVILO \\\n" \
368"\"select evt, prg from GYTTabEvIlo \\\n" \
369"where etab = :etab\"\n" \
370"\n" \
371"/* Requete de lecture du type de Siret Pages Pro */\n" \
372"#define GIV_RQ_SELECT_SIRET \\\n" \
373"\"select siret from GYTtabPagesPro \\\n" \
374"where (siret = :siret)\"\n" \
375"\n" \
376"/* libellé de localité de rattachement */\n" \
377"#define GIV_RQ_SELECT_LIB_LJLORN \\\n" \
378"\"select distinct a.liblae \\\n" \
379"from GYTtabPelrep a, LJLORN b\\\n" \
380" where (a.depart = b.cdsdep and a.numloc = b.numloc \\\n" \
381" and (a.arrond = '00' or a.arrond = '99')) \\\n" \
382" and (b.cddprn = :depart and b.nulorn = :numloc)\"\n" \
383"\n" \
384"/* localités par département */\n" \
385"#define GIV_RQ_SELECT_LOC_DEP \\\n" \
386"\"select numloc \\\n" \
387"from GYTtabPelrep where depart = :depart and numloc != '99999'\"\n" \
388"\n" \
389"/* GIV_RQ_SELECT_ZU : texte SQL de la requete de recherche Zone Urbaine */\n" \
390"\n" \
391"#define GIV_RQ_SELECT_ZU \\\n" \
392"\"select deppole,locpole \\\n" \
393"from GYTtabPelzu\\\n" \
394" where depart = :depart and localite = :numloc\"\n" \
395"\n" \
396"#define GIV_RQ_SELECT_ZU_POLE \\\n" \
397"\"select deppole,locpole \\\n" \
398"from GYTtabPelzu\\\n" \
399" where depart = :depart and localite = :numloc\\\n" \
400" and depart = deppole and localite = locpole\"\n" \
401"\n" \
402"#define GIV_RQ_SELECT_ZU_LF \\\n" \
403"\"select deppole,locpole \\\n" \
404"from GYTtabPelzu\\\n" \
405" where depart = :depart and localite = :numloc\"\n" \
406"\n" \
407"/* GIV_RQ_SELECT_LOCFUS : texte SQL de la requete de recherche de localité fusionnée */\n" \
408"\n" \
409"#define GIV_RQ_SELECT_LOCFUS \\\n" \
410"\"select depfus,locfus \\\n" \
411"from GYTtabPelFusion \\\n" \
412" where depart = :depart and localite = :numloc\"\n" \
413"\n" \
414"#define GIV_RQ_SELECT_REGION \\\n" \
415"\"select cdsreg \\\n" \
416"from ljdept\\\n" \
417" where cdsdep = :depart\"\n" \
418"\n" \
419"#define GIV_RQ_SELECT_NEW_REGION \\\n" \
420"\"select cdsreg, cdrgol \\\n" \
421"from ljdept\\\n" \
422" where cdsdep = :depart\"\n" \
423"\n" \
424"#define GIV_RQ_SELECT_CRC \\\n" \
425"\"select codecrc,libelcrc,navigateur \\\n" \
426"from donneescrc\\\n" \
427" where depart = :depart and numloc = :numloc and numnat = :numnat \\\n" \
433" where (depart = %s) and (numnat = :numnat) and (numlo = :numlo) and (numls = :numls) and (substr(blocid,1,4) != 'C000') and blocid is not null\"\n" \
578" and (numlo = :cNumlo) and (numls = :cNumls))\"\n" \
579"\n" \
580"#define GIV_RQ_SELECT_DNOM_PRINC \"\\\n" \
581" select nvl(min(substr(a.inparu,3,1)||decode(a.indprf,'0',1,0)||decode(substr(a.inparu,1,1),'o',1,'s',2,'c',3,'p',4,5)||decode(a.indrecgpp,'1',0,1)||decode(c.tpdsob,'SC',decode(c.stobj,'PB',8,1),'FI',2,'VI',3,'IN',4,' T',5,'NV',6,'NT',7,8)||decode(marque,null,0,1)||decode(a.numls,'0000',1,0)||nvl(a.nogrou||a.noselo||a.nosels,'ZZZZZZZ0000000')||a.numnat||a.numlo||a.numls),'999999ZZZZZZZ0000000ZZZZZZZZZZZZZZZZZZ') from VueTabIeInsc_%s_%s_%s a,VueTabIamic_%s_%s_%s c \\\n" \
582" where \\\n" \
583" a.indmic = '1' \\\n" \
584" and c.numnat = a.numnat and c.numlo = a.numlo and c.numls = a.numls \\\n" \
585" and a.etab = :etab \\\n" \
586" union \\\n" \
587" select nvl(min(substr(a.inparu,3,1)||decode(a.indprf,'0',1,0)||decode(substr(a.inparu,1,1),'o',1,'s',2,'c',3,'p',4,5)||'1'||'9'||decode(marque,null,0,1)||decode(a.numls,'0000',1,0)||nvl(a.nogrou||a.noselo||a.nosels,'ZZZZZZZ0000000')||a.numnat||a.numlo||a.numls),'999999ZZZZZZZ0000000ZZZZZZZZZZZZZZZZZZ') from VueTabIeInsc_%s_%s_%s a \\\n" \
588" where \\\n" \
589" a.indmic = '0' \\\n" \
590" and a.etab = :etab \\\n" \
591" order by 001 \\\n" \
592"\"\n" \
593"\n" \
594"/* oppositions et black-listes */\n" \
595"#define GIV_RQ_SELECT_OPP_PART \\\n" \
596"\"select opposition from GYTTabPartOpp \\\n" \
597" where origine = :origine and refext = :refext\"\n" \
598"\n" \
599"#define GIV_RQ_SELECT_OPP_URLGR \\\n" \
600"\"select codan8 from GYTTabURLGrOpp \\\n" \
601" where etab = :etab and codan8 = :codan8\"\n" \
602"\n" \
603"#define GIV_RQ_SELECT_PROF_URLGR \\\n" \
604"\"select codan8 from GYTTabURLGrProf \\\n" \
605" where codan8 = :codan8\"\n" \
606"\n" \
607"#define GIV_RQ_SELECT_BL_CRC_LR \\\n" \
608"\"select codan8 from GYTTabBListCRCLR \\\n" \
609" where etab = :etab and codan8 = :codan8 \\\n" \
610" and tpdsob = :tpdsob and contenu = :contenu\"\n" \
611"\n" \
612"#define GIV_RQ_SELECT_BL_CRC_FD \\\n" \
613"\"select tpdsob from GYTTabBListCRCFD \\\n" \
614" where (etab = :etab and contenu = :contenu) \\\n" \
615" or (tpdsob = :tpdsob)\"\n" \
616"\n" \
617"#define GIV_RQ_SELECT_BL_EPJ_FD \\\n" \
618"\"select etab from GYTTabBListEPJFD \\\n" \
619" where (etab = :etab)\"\n" \
620"\n" \
621"#define GIV_RQ_SELECT_BL_EPJ_PROF \\\n" \
622"\"select codan8 from GYTTabBListEPJProf \\\n" \
623" where etab = :etab and codan8 = :codan8\"\n" \
624"\n" \
625"/* conflits */\n" \
626"#define GIV_RQ_SELECT_PRIO_PROF_CRC \\\n" \
627"\"select codan8 from GYTTabCRCProfPrio \\\n" \
628" where codan8 = :codan8 and contenu = :contenu\"\n" \
629"\n" \
630"/* extra-localité proxi */\n" \
631"#define GIV_RQ_SELECT_EXTRA_LOC_IS \"\\\n" \
632" select b.codan8 from VueTabIeInsc_%s_%s_%s a,VueTabIaProf_%s_%s_%s b \\\n" \
633" where b.codan8 = :codan8 \\\n" \
634" and a.numnat = b.numnat and a.numlo = b.numlo and a.numls = b.numls \\\n" \
635" and a.etab = :etab \\\n" \
636" and decode(a.depact,null,decode(a.coddep,null,a.deppar,a.coddep),a.depact) = a.deppar \\\n" \
637" and decode(a.locact,null,decode(a.codloc,null,a.locpar,a.codloc),a.locact) = decode(a.locpar,'99999',decode(a.locact,null,a.codloc,a.locact),a.locpar) \\\n" \
638" union \\\n" \
639" select b.codan8 from VueTabIeInsc_%s_%s_%s a,GYTtabProfEtab b \\\n" \
640" where b.etab = :etab \\\n" \
641" and b.codan8 = :codan8 \\\n" \
642" and (b.origine = '4' or b.origine = '6') \\\n" \
643" and a.etab = b.etab \\\n" \
644" and a.numls = '0000' \\\n" \
645" and decode(a.depact,null,decode(a.coddep,null,a.deppar,a.coddep),a.depact) = a.deppar \\\n" \
646" and decode(a.locact,null,decode(a.codloc,null,a.locpar,a.codloc),a.locact) = decode(a.locpar,'99999',decode(a.locact,null,a.codloc,a.locact),a.locpar) \\\n" \
15174"/* giv_ecrit_tabIeBloc : inserer le resultat dans la table de blocs ou supprimer une ligne de la table ou enfin mettre à jour plusieurs lignes\n" \